home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 084 / qdoc_200.arc / STRUCT.200 < prev    next >
Encoding:
Text File  |  1988-03-30  |  11.5 KB  |  310 lines

  1.  
  2. QuickBBS Version 2.00 Structures Document
  3. =========================================
  4.  
  5. This file contains all of the data file structures used by the QuickBBS
  6. Version 2 series.  These are provided as a reference for utility writers
  7. to develop and test their programs for use with QuickBBS.
  8.  
  9. All "String[]" type variables are one byte bigger than specified, byte 0
  10. (the first byte) contains the length of the string.  The remaining of
  11. the string should be ignored, as it is not padded with nulls.
  12.  
  13.    Turbo Pascal Variable Type     C Language Var Type       Length
  14.    ===============================================================
  15.    Byte                        |  Char                   |  1 byte
  16.    Char                        |  Char                   |  1 byte
  17.    Integer                     |  Int                    |  2 bytes
  18.    Word                        |  Unsigned Int           |  2 bytes
  19.    LongInt                     |  Long                   |  4 bytes
  20.    Real                        |  [ None ]               |  6 bytes
  21.    ===============================================================
  22.  
  23. ==========================================================================
  24.  
  25. Type
  26.   FlagType = Array[1..4] of Byte;
  27.  
  28.   UserRecord = Record    { Used in the USERS.BBS File }
  29.                  Name:               String[35];
  30.                  City:               String[25];
  31.                  Pwd:                String[15];
  32.                  DataPhone,
  33.                  HomePhone:          String[12];
  34.                  LastTime:           String[5];
  35.                  LastDate:           String[8];
  36.                  Attrib:             Byte;
  37.                  Flags:              FlagType;
  38.                  Credit,
  39.                  Pending,
  40.                  TimesPosted,
  41.                  HighMsgRead,
  42.                  SecLvl,
  43.                  Times,
  44.                  Ups,
  45.                  Downs,
  46.                  UpK,
  47.                  DownK,
  48.                  TodayK,
  49.                  Elapsed,
  50.                  Len:                Integer;
  51.                  ExtraSpace:         Array[1..8] of Byte;
  52.                End;
  53.  
  54. (*  Attrib:
  55.  
  56.       Bit 0: Deleted
  57.       Bit 1: Screen Clear Codes
  58.       Bit 2: More Prompt
  59.       Bit 3: ANSI
  60.       Bit 4: No-Kill
  61.       Bit 5: Ignore Download Hours
  62.       Bit 6: ANSI Full Screen Editor
  63.       Bit 7: [ Reserved ]
  64.  
  65. *)
  66.  
  67. { Nodelist Records *************************************************** }
  68.  
  69.    NodeIdxRecord = Record  { Used in the QNL_IDX.BBS file }
  70.                      Zone,
  71.                      Net,
  72.                      Node:      Integer;
  73.                      NodeType:  Byte;
  74.                    End;
  75.  
  76.    NodelistRecord = Record  { Used in the QNL_DAT.BBS file }
  77.                       NodeType:  Byte;
  78.                       Zone,
  79.                       Net,
  80.                       Node:      Integer;
  81.                       Name:      String[20];
  82.                       City:      String[40];
  83.                       Phone:     String[40];
  84.                       BaudRate:  Integer;
  85.                       Cost:      Integer;
  86.                     End;
  87.  
  88. { Message Records ******************************************************}
  89.  
  90.       InfoRecord = Record   { Used in the MSGINFO.BBS file }
  91.                      LowMsg:      Integer;     { Lowest Message in File }
  92.                      HighMsg:     Integer;     { Highest Message in File }
  93.  
  94.                      TotalActive: Integer;     { Total Active Messages }
  95.  
  96.                      ActiveMsgs:  Array[1..200] of Integer;
  97.                    End;
  98.  
  99.       IdxRecord = Record  { Used in the MSGIDX.BBS file }
  100.                     MsgNum:       Integer;
  101.                     Board:        Byte;
  102.                   End;
  103.  
  104.           HdrRecord = Record  { Used in the MSGHDR.BBS file }
  105.                         MsgNum,
  106.                         ReplyTo,
  107.                         SeeAlsoNum,
  108.                         TRead:              Integer;
  109.                         StartRec:           Word;
  110.                         NumRecs,
  111.                         DestNet,
  112.                         DestNode,
  113.                         OrigNet,
  114.                         OrigNode:           Integer;
  115.                         DestZone,
  116.                         OrigZone:           Byte;
  117.                         Cost:               Integer;
  118.                         MsgAttr,
  119.                         NetAttr,
  120.                         Board:              Byte;
  121.                         PostTime:           String[5];
  122.                         PostDate:           String[8];
  123.                         WhoTo,
  124.                         WhoFrom:            String[35];
  125.                         Subj:               String[72];
  126.                       End;
  127.  
  128.  
  129. (* Msg Attributes:
  130.  
  131.       Bit 0: Deleted
  132.       Bit 1: Unmoved Outgoing Net Message
  133.       Bit 2: Is a Net Mail Message
  134.       Bit 3: Private
  135.       Bit 4: Received
  136.       Bit 5: Unmoved Outgoing Echo Message
  137.       Bit 6: Local Bit
  138.       Bit 7: [ Reserved ]
  139.  
  140.    Net Attributes:
  141.  
  142.       Bit 0: Kill Message after it's been sent
  143.       Bit 1: Sent OK
  144.       Bit 2: File(s) Attached
  145.       Bit 3: Crash Priority
  146.       Bit 4: Request Receipt
  147.       Bit 5: Audit Request
  148.       Bit 6: Is a Return Receipt
  149.       Bit 7: [ Reserved ]
  150.  
  151.   Each record in the MSGTOIDX.BBS file is of type String[35], each entry
  152.   is simply the name of the corresponding message in MSGHDR.BBS is
  153.   addressed to.
  154.  
  155.   Each record in the MSGTXT.BBS file is of type String[255], each entry
  156.   is used to store blocks of message text.  The variable "StartRec" in
  157.   the MSGHDR.BBS file contains the starting record position for the
  158.   text, the variable "NumRecs" indicates how many consecutive blocks
  159.   of text there are in the MSGTXT.BBS file.
  160.  
  161. *)
  162.  
  163. { Other Stuff *********************************************************** }
  164.  
  165.   SysInfoRecord = Record  { Used in the SYSINFO.BBS file }
  166.                     CallCount:    LongInt;
  167.                     LastCaller:   String[35];
  168.                     ExtraSpace:   Array[1..128] of Byte;
  169.                   End;
  170.  
  171.   TimeLogRecord = Record  { Used in the TIMELOG.BBS file }
  172.                     StartDate:        String[8];
  173.                     BusyPerHour:      Array[0..23] of Integer;
  174.                     BusyPerDay:       Array[0..6] of Integer;
  175.                   End;
  176.  
  177.      MenuRecord = Record  { Used for all *.MNU files }
  178.                     Typ:      Byte;
  179.                     Sec:      Integer;
  180.                     Flags:    FlagType;
  181.                     Str:      String[75];
  182.                     Key:      Char;
  183.                     Data:     String[80];
  184.                     Fg,
  185.                     Bg:       Byte;
  186.                   End;
  187.  
  188. { Configuration Information ********************************************** }
  189.  
  190.       EventRecord = Record  { Part of Configuration Record }
  191.                       Status:       Byte; { 0=Deleted 1=Enabled 2=Disabled }
  192.                       RunTime:      String[5];
  193.                       ErrorLevel:   Byte;
  194.                       Days:         Byte;
  195.                       Forced:       Boolean;
  196.                       LastTimeRun:  String[8];
  197.                     End;
  198.  
  199.       BoardRecord = Record  { Part of Configuration Record }
  200.                       Name:         String[16];
  201.                       Typ:          Byte; { 0=Standard 1=Net 2=EMail 3=Echo }
  202.                       Kinds:        Byte; { 0=Both 1=Pvt 2=Pub 3=Read-Only }
  203.                       Combined:     Boolean;
  204.                       Aliases:      Boolean;
  205.  
  206.                       ReadSecLvl:   Integer;
  207.                       ReadFlags:    FlagType;
  208.  
  209.                       WriteSecLvl:  Integer;
  210.                       WriteFlags:   FlagType;
  211.  
  212.                       SysopSecLvl:  Integer;
  213.                       SysopFlags:   FlagType;
  214.                     End;
  215.  
  216.      ConfigRecord = Record  { Used for the CONFIG.BBS file }
  217.                       (*  Modem Parameters  *)
  218.                       CommPort:      Integer;
  219.                       InitBaud,
  220.                       InitTimes,
  221.                       AnswerWait:    Integer;
  222.                       ModemInitStr,
  223.                       ModemBusyStr:  String[70];
  224.                       ModemInitResp,
  225.                       ModemBusyResp,
  226.                       Resp300,
  227.                       Resp1200,
  228.                       Resp2400:      String[40];
  229.  
  230.                       (*  System Paths  *)
  231.                       MenuPath,
  232.                       TextPath,
  233.                       NetPath:      String[66];
  234.  
  235.                       (*  Restriction Parameters  *)
  236.                       MinBaud,
  237.                       GraphicsBaud,
  238.                       XferBaud:      Integer;
  239.                       LowBaudStart,
  240.                       LowBaudEnd,
  241.                       DownloadStart,
  242.                       DownloadEnd,
  243.                       PagingStart,
  244.                       PagingEnd:     String[5];
  245.  
  246.                       (*  Matrix Information  *)
  247.                       MatrixZone,
  248.                       MatrixNet,
  249.                       MatrixNode:    Integer;
  250.                       AkaNet,
  251.                       AkaNode:       Array[1..5] of Integer;
  252.                       NetMailBoard:  Integer;
  253.  
  254.                       (*  Default Information for New Users  *)
  255.                       DefaultSec:                Integer;
  256.                       DefaultCredit:             Integer;
  257.                       DefaultFlags:              FlagType;
  258.  
  259.                       (*  Sysop Security Levels  *)
  260.                       EditorCmdStr:    String[70];
  261.                       OriginLine:      String[60];
  262.                       SysopName:       String[35];
  263.                       AutoLogonChar,
  264.                       FastLogon,
  265.                       ScreenBlanking,
  266.                       UseLastRead,
  267.                       MonoMode,
  268.                       DirectWrite,
  269.                       SnowCheck,
  270.                       NetEchoExit,
  271.                       OneWordNames,
  272.                       CheckMail,
  273.                       AskHomePhone,
  274.                       AskDataPhone,
  275.                       GraphicsAvail:   Boolean;
  276.                       InactiveTimeOut: Integer;
  277.                       LogonTime:       Integer;
  278.                       DefFgColor:      Integer;
  279.                       DefBgColor:      Integer;
  280.                       PasswordTries:   Integer;
  281.                       MaxPageTimes:    Integer;
  282.                       PageBellLen:     Integer;
  283.  
  284.                       UseZoneGates:    Boolean;
  285.                       ExtraSpace:      Array[1..511] of Byte;
  286.  
  287.                       EventRec:        Array[1..30] of EventRecord;
  288.                       BoardRec:        Array[1..200] of BoardRecord;
  289.                     End;
  290.  
  291.   ExitRecord = Record  { Used for the EXITINFO.BBS file }
  292.                  BaudRate:        Integer;
  293.                  SysInfo:         SysInfoRecord;
  294.                  TimeLogInfo:     TimeLogRecord;
  295.                  UserInfo:        UserRecord;
  296.                  EventInfo:       EventRecord;
  297.                  NetMailEntered:  Boolean;
  298.                  EchoMailEntered: Boolean;
  299.                  LoginTime:       String[5];
  300.                  LoginDate:       String[8];
  301.                  TmLimit:         Integer;
  302.                  LoginSec:        LongInt;
  303.                  Credit:          LongInt;
  304.                  UserRecNum:      Integer;
  305.                  ReadThru:        Integer;
  306.                  PageTimes:       Integer;
  307.                  DownLimit:       Integer;
  308.                End;
  309.  
  310.